/*************************************************************************
 *                                                                       *
 * This file is part of the FreeMAPs distribution.  For full copyright   *
 * information, see COPYRIGHT and COPYING.LESSER.                        *
 *                                                                       *
 * Author:           sqbang                                              *
 * Email:            sqbang@ustc.edu                                     *
 * Date:             2013.10.01                                          *
 *                                                                       *
 *************************************************************************/

//declaration header
#include "COMMON/enum/EquationEnsembleType.h"

//COMMON headers
#include "COMMON/tbox/StringToEnum.h"

namespace FreeMAPs
{

namespace Utilities
{

template<>
void
init_string_to_enum(
    Bimap<std::string, EquationEnsembleType>& se)
{
    se.clear();

    se.insert ("HEAT_CONDUCTION",                 EquationEnsembleType::HEAT_CONDUCTION);
    se.insert ("NAVIER_STOKES",                   EquationEnsembleType::NAVIER_STOKES);
    se.insert ("CREEPING_FLOW",                   EquationEnsembleType::CREEPING_FLOW);
    se.insert ("ELASTIC_MECHANICS",               EquationEnsembleType::ELASTIC_MECHANICS);
    se.insert ("RAY_TRACING",                     EquationEnsembleType::RAY_TRACING);
    se.insert ("LASER_PROPAGATION_IN_ATMOSPHERE", EquationEnsembleType::LASER_PROPAGATION_IN_ATMOSPHERE);

    se.insert ("INVALID_VALUE", EquationEnsembleType::INVALID_VALUE);
}



bool
is_pde_equation_ensemble (
    const EquationEnsembleType type)
{
    bool is_pde = true;
    switch (type)
    {
    case EquationEnsembleType::RAY_TRACING:
    case EquationEnsembleType::LASER_PROPAGATION_IN_ATMOSPHERE:
    case EquationEnsembleType::INVALID_VALUE:
        {
            is_pde = false;
            break;
        }
    default:
        {
            is_pde = true;
        }
    }

    return is_pde;
}

} //namespace Utilities

} //namespace FreeMAPs
